package com.guigui.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guigui.common.exception.NoStockException;
import com.guigui.common.to.MemberDto;
import com.guigui.common.to.OrderTo;
import com.guigui.common.utils.PageUtils;
import com.guigui.gulimall.order.dto.OrderSubmitDto;
import com.guigui.gulimall.order.entity.OrderEntity;
import com.guigui.gulimall.order.vo.CartItem;
import com.guigui.gulimall.order.vo.OrderConfirmVo;
import com.guigui.gulimall.order.vo.OrderListVo;
import com.guigui.gulimall.order.vo.OrderSubmitSuccessVo;

import java.util.List;
import java.util.Map;

/**
 * 订单
 *
 * @author xin
 * @email 806748502@qq.com
 * @date 2021-07-23 16:05:47
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取用户提交信息
     * @param user
     * @return
     */
    OrderConfirmVo getOrderConfirm();

    /**
     * 提交订单
     * @param submitDto
     * @return
     */
    OrderSubmitSuccessVo submitOrder(OrderSubmitDto submitDto);

    /**
     * 超时关单，执行了这个方法---未付款就关闭订单
     * @param order
     */
    void closeOrder(OrderEntity order);

    /**
     * 订单列表
     * @return
     */
    List<OrderListVo> getOrderList();

}

